#!/usr/bin/bash
# making  dag version
#echo "make dag EXTRA_FLAGS=\"-Dtmax=41 -Dnx=2048 -Dny=2048\""

make clean
make unreuse 
## now runing

filename=test_unreuse_old_onestep.log
#dag_time=test-time_reuse_v1_p.log
rm $filename #$dag_time
#for p in 1 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 36 40 44 48 52 56 60 64 
for p in 1 2 4 8 16 32 64
do
  for j in 1 #2 3 4 5 
  do
    echo "dag runing,thread_num=$p,num=$j"
    echo "dag runing,thread_num=$p,num=$j" >> $filename
    bsub -I  -p -q q_sw_expr -b -share_size 4096 -N 1 -cgsp 64  ./fdtd_unreuse $p >> $filename
    #bsub -I  -p -q q_sw_expr -b -share_size 4096 -N 1 -cgsp 64  ./fdtd_reuse $p >> $filename
    #bsub -I  -p -q q_sw_expr -b -share_size 4096 -N 1 -cgsp 64  ./fdtd_reuse_v1 $p >> $filename
    #bsub -I  -p -q q_sw_expr -b -share_size 4096 -N 1 -cgsp 64  ./fdtd_reuse $p >> $filename
    #srun -N 1 -n 64 ./fdtd_reuse_v2 $p >>$filename
  done
done
#grep -E 'dag runing|exec time :' $filename>>$dag_time

